import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
const history = createWebHistory()
const routes: Array<RouteRecordRaw> = [
  // {
  //   path: "/",
  //   redirect: "/home",
  // },
  {
    path: "/home",
    name: "home",
    component: () => import("../views/index.vue"),
  },
  {

    path: "/points",
    name: "points",
    component: () => import("../views/points.vue"),
  },
];
const router = createRouter({
  history,
  routes
})

//挂载路由导航守卫
router.beforeEach(async (to, from, next) => {
  console.log(to.query)
  return next()

})

export default router